from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait

from web_L3.po.BaseDriver import BaseDriver


class ContactPage(BaseDriver):
    def assert_name(self, name):
        #
        ele = (By.CSS_SELECTOR, '.js_list td:nth-child(2)')

        # 显示等待直到页面出现
        WebDriverWait(self.driver, 10).until(
            expected_conditions.visibility_of_element_located(ele))


        get_element =(By.CSS_SELECTOR, '.js_list td:nth-child(2)')
        next_element =(By.XPATH, "//*[@class='ww_pageNav_info_arrowWrap js_next_page']")

        return self.find_name(get_element,next_element,name)


